<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
 .number {
    text-align: center;
 }

 .one {
    margin-bottom: 20px;
 }
</style>
<body>
    <div class="number">
        <div class="one">数字一：<input type="text"> 
        </div>
    </br>
        <div class="two">数字二： <input type="text">
        </div>
    </div>

    <script>{
            let obj = {
                sing: function (x, y) {
                    console.log('两个数字相加等于' + (x + y));

                }
            }

            console.log(obj.sing(1, 2));
        }
    </script>
</body>

</html>